import React, { Component } from "react"

export class AddCounter extends Component {
    subAdd(count) {
        this.props.subClick(count)
    }

    render() {
        return (
            <div>
                <button onClick={() => this.subAdd(1)}>+1</button>
                <button onClick={() => this.subAdd(5)}>+5</button>
                <button onClick={() => this.subAdd(10)}>+10</button>
            </div>
        )
    }
}

export default AddCounter


